<script type="application/javascript" src="templates/layer/layer.js"></script>
<div class="h-top" id="home" style="">
    <div class="top-header">
        <ul class="cl-effect-16 top-nag">
            <li><a href="index.php?act=index" data-hover="{%if $lan eq 'zh'%}{%$title_zh%}{%else%}{%$title_en%}{%/if%}" style="font-size: 2.5em">{%if $lan eq 'zh'%}{%$title_zh%}{%else%}{%$title_en%}{%/if%}</a></li>
        </ul>

        <div class="search-box" style="margin-top: 1.8em;width: 25%">
            <div class="nav" style="float: left;margin-right: 5%;margin-top: 2.5%">
                <a style="text-decoration:none;" onclick="lan('zh')" id='zh' {%if $lan eq 'zh'%}class="highlight"{%/if%}>简体中文</a>
                <a style="text-decoration:none;" onclick="lan('en')" id='en' {%if $lan eq 'en'%}class="highlight"{%/if%} >English</a>
            </div>
            <div class="b-search" style="width: 50%;float: left">
                <form method="post" action="index.php?act=search">
                    <input type="text" value="Search" name="val" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Search';}">
                    <input type="submit" value="">
                </form>
            </div>
        </div>
        <div class="clearfix"></div>
        <script type="application/x-javascript">
            function lan(one)
            {
                if (!one)
                {
                    one = 'zh'
                }

                $.ajax({
                    type:"post",
                    url:"index.php?act=lan", // 这里是提交到什么地方的url
                    data:{ lan:one }, // 这里把表单里面的数据放在这里传到后台
                    dataType:"json", //返回值的方式 还可以为html等格式
                    success:function(res)
                    {
                        window.location.reload();
                    }
                });
            }
        </script>
    </div>
</div>